3.134 \(\int x (a+b \tan ^{-1}(\frac{c}{x})) \, dx\)

Optimal. Leaf size=39 \[ \frac{1}{2} x^2 \left (a+b \tan ^{-1}\left (\frac{c}{x}\right )\right )-\frac{1}{2} b c^2 \tan ^{-1}\left (\frac{x}{c}\right )+\frac{b c x}{2} \]

[Out]

(b*c*x)/2 + (x^2*(a + b*ArcTan[c/x]))/2 - (b*c^2*ArcTan[x/c])/2

________________________________________________________________________________________

Rubi [A]  time = 0.0173373, antiderivative size = 39, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {5033, 193, 321, 203} \[ \frac{1}{2} x^2 \left (a+b \tan ^{-1}\left (\frac{c}{x}\right )\right )-\frac{1}{2} b c^2 \tan ^{-1}\left (\frac{x}{c}\right )+\frac{b c x}{2} \]

Antiderivative was successfully verified.

[In]

Int[x*(a + b*ArcTan[c/x]),x]

[Out]

(b*c*x)/2 + (x^2*(a + b*ArcTan[c/x]))/2 - (b*c^2*ArcTan[x/c])/2

Rule 5033

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTan
[c*x^n]))/(d*(m + 1)), x] - Dist[(b*c*n)/(d*(m + 1)), Int[(x^(n - 1)*(d*x)^(m + 1))/(1 + c^2*x^(2*n)), x], x]
/; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1]

Rule 193

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b}, x] && LtQ[n, 0]
 && IntegerQ[p]

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int x \left (a+b \tan ^{-1}\left (\frac{c}{x}\right )\right ) \, dx &=\frac{1}{2} x^2 \left (a+b \tan ^{-1}\left (\frac{c}{x}\right )\right )+\frac{1}{2} (b c) \int \frac{1}{1+\frac{c^2}{x^2}} \, dx\\ &=\frac{1}{2} x^2 \left (a+b \tan ^{-1}\left (\frac{c}{x}\right )\right )+\frac{1}{2} (b c) \int \frac{x^2}{c^2+x^2} \, dx\\ &=\frac{b c x}{2}+\frac{1}{2} x^2 \left (a+b \tan ^{-1}\left (\frac{c}{x}\right )\right )-\frac{1}{2} \left (b c^3\right ) \int \frac{1}{c^2+x^2} \, dx\\ &=\frac{b c x}{2}+\frac{1}{2} x^2 \left (a+b \tan ^{-1}\left (\frac{c}{x}\right )\right )-\frac{1}{2} b c^2 \tan ^{-1}\left (\frac{x}{c}\right )\\ \end{align*}

Mathematica [A]  time = 0.0080284, size = 44, normalized size = 1.13 \[ \frac{a x^2}{2}+\frac{1}{2} b c^2 \tan ^{-1}\left (\frac{c}{x}\right )+\frac{1}{2} b x^2 \tan ^{-1}\left (\frac{c}{x}\right )+\frac{b c x}{2} \]

Antiderivative was successfully verified.

[In]

Integrate[x*(a + b*ArcTan[c/x]),x]

[Out]

(b*c*x)/2 + (a*x^2)/2 + (b*c^2*ArcTan[c/x])/2 + (b*x^2*ArcTan[c/x])/2

________________________________________________________________________________________

Maple [A]  time = 0.03, size = 37, normalized size = 1. \begin{align*}{\frac{a{x}^{2}}{2}}+{\frac{b{x}^{2}}{2}\arctan \left ({\frac{c}{x}} \right ) }-{\frac{b{c}^{2}}{2}\arctan \left ({\frac{x}{c}} \right ) }+{\frac{xbc}{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*arctan(c/x)),x)

[Out]

1/2*a*x^2+1/2*arctan(c/x)*b*x^2-1/2*b*c^2*arctan(x/c)+1/2*x*b*c

________________________________________________________________________________________

Maxima [A]  time = 1.48726, size = 49, normalized size = 1.26 \begin{align*} \frac{1}{2} \, a x^{2} + \frac{1}{2} \,{\left (x^{2} \arctan \left (\frac{c}{x}\right ) -{\left (c \arctan \left (\frac{x}{c}\right ) - x\right )} c\right )} b \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctan(c/x)),x, algorithm="maxima")

[Out]

1/2*a*x^2 + 1/2*(x^2*arctan(c/x) - (c*arctan(x/c) - x)*c)*b

________________________________________________________________________________________

Fricas [A]  time = 2.33068, size = 77, normalized size = 1.97 \begin{align*} \frac{1}{2} \, b c x + \frac{1}{2} \, a x^{2} + \frac{1}{2} \,{\left (b c^{2} + b x^{2}\right )} \arctan \left (\frac{c}{x}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctan(c/x)),x, algorithm="fricas")

[Out]

1/2*b*c*x + 1/2*a*x^2 + 1/2*(b*c^2 + b*x^2)*arctan(c/x)

________________________________________________________________________________________

Sympy [A]  time = 0.384635, size = 36, normalized size = 0.92 \begin{align*} \frac{a x^{2}}{2} + \frac{b c^{2} \operatorname{atan}{\left (\frac{c}{x} \right )}}{2} + \frac{b c x}{2} + \frac{b x^{2} \operatorname{atan}{\left (\frac{c}{x} \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*atan(c/x)),x)

[Out]

a*x**2/2 + b*c**2*atan(c/x)/2 + b*c*x/2 + b*x**2*atan(c/x)/2

________________________________________________________________________________________

Giac [A]  time = 1.1642, size = 69, normalized size = 1.77 \begin{align*} \frac{1}{4} \, b c^{2} i \log \left (i x + c\right ) - \frac{1}{4} \, b c^{2} i \log \left (-i x + c\right ) + \frac{1}{2} \, b x^{2} \arctan \left (\frac{c}{x}\right ) + \frac{1}{2} \, b c x + \frac{1}{2} \, a x^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctan(c/x)),x, algorithm="giac")

[Out]

1/4*b*c^2*i*log(i*x + c) - 1/4*b*c^2*i*log(-i*x + c) + 1/2*b*x^2*arctan(c/x) + 1/2*b*c*x + 1/2*a*x^2